local aaa = require ("qqq")

local function findFirstInteger(s)
    local start = nil
    local numStr = ""

    print("11111111111111111111")
    -- 遍历字符串寻找第一个数字序列
    for i = 1, #s do
        local c = s:sub(i, i)
        if c >= '0' and c <= '9' then
            if not start then
                start = i  -- 记录起始位置
            end
            numStr = numStr .. c  -- 积累数字字符
        else
            if start then
                break  -- 遇到非数字字符时终止搜索
            end
        end
    end

    return #numStr > 0 and tonumber(numStr) or -1
end

-- 测试用例
print(findFirstInteger("jpk596osk"))  -- 输出 596
print(findFirstInteger("DE191923"))   -- 输出 345
print(findFirstInteger("abc"))        -- 输出 -1


findFirstInteger("1111111111111111111111asdsad");

local list = {[2] = "12131",[3] = "dasdad",[1] ="11111111", s = "sssssssssssss"}

print(list[1]);

for k, v in pairs({1,23,3,445,5,4,54,64,54,5,45,45,45,45}) do
    print(k.."--------"..v)
end

print(list.s);
print(aaa.."11111111111111111111111111111111")

